package com.cloud.train.batch.feign;

import com.cloud.train.common.resp.CommonResp;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.Mapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.Date;
@Service
//@FeignClient(name = "business",url = "http://127.0.0.1:8002/business/admin/daily-train")
@FeignClient(name = "business")
public interface BusinessFeign {
    @GetMapping("/business/hello")
    String hello();
    @GetMapping("/business/admin/daily-train/gen-daily/{data}")
    CommonResp<Object> getDaily(@PathVariable @DateTimeFormat(pattern = "yyyy-MM-dd") Date data);
}
